#ifndef __DATA_PROCESS_H__
#define __DATA_PROCESS_H__

#include "string.h"
#include "math.h"
#include "stdio.h"
#include "global.h"
#include "stdlib.h"
#include "stdbool.h"
#include "stdint.h"


uint32_t Byte_to_u32(uint8_t byte[],uint8_t OffsetAdr);
	
uint8_t Cacl_Data_MSB(uint16_t pdata);
uint8_t Cacl_Data_LSB(uint16_t pdata);

uint16_t BEBufToUint16(uint8_t *_pBuf);
uint16_t LEBufToUint16(uint8_t *_pBuf);

int16_t BEBufToint16(uint8_t *_pBuf);

uint64_t BEBufToUint48(uint8_t *_pBuf);
uint64_t BEBufToUint64(uint8_t *_pBuf);

uint32_t BEBufToUint32(uint8_t *_pBuf);
uint32_t LEBufToUint32(uint8_t *_pBuf);
uint64_t LEBufToUint64(uint8_t *_pBuf);

void copyUint32ToArray(uint32_t value, uint8_t* array);
void copyUint64ToArray(uint64_t value, uint8_t* array);

uint16_t TwoU16Num_Sort_Min(uint16_t pdata1,uint16_t pdata2);
int16_t TwoS16Num_Sort_Min(int16_t pdata1,int16_t pdata2);
uint8_t TwoU8Num_Sort_Min(uint8_t pdata1,uint8_t pdata2);
void u32tou8Arry(uint32_t data,uint8_t* pdata);

unsigned long Fast_Mult(unsigned int a, unsigned int b) ;
void Bubble_Sort(uint16_t arr[], uint16_t len) ;
bool StringIsZero(char *pdata) ;
void u8ToCharTable(char* pChar,uint8_t u8Val);

#endif
